{% extends '::twoColumnLayout.html.twig' %}

{% block content %}
    <h1>Vakken</h1>
    {% if subjects|length < 1 %}
        <p>Er zijn nog geen vakken</p>
    {% else %}
        <table class="dataTable">
        
            <thead>
                <tr>
                    <th>Vak</th>
                    <th class="action">&nbsp;</th>
                    <th class="action">&nbsp;</th>
                </tr>
            </thead>
            
            <tbody>
            
                {% for subject in subjects %}
                <tr>
                
                    <td>{{ subject.name }}</td>
                    <td>
                        <a href="{{ path('MooiWallBundle_SubjectEdit', {'name' : subject.name}) }}">Aanpassen</a>
                    </td>
                    <td>
                        <a class="confirm" href="{{ path('MooiWallBundle_SubjectDelete', {'name' : subject.name}) }}">
                            verwijderen
                            <h3 class="head">{{ subject.name }} Verwijderen</h3>
                            <p class="body">Weet je zeker dat je het vak {{ subject.name }} en alle bijbehorende posts wilt verwijderen?</p>
                        </a>
                    </td>
                    
                </tr>
                {% endfor %}
                
            </tbody>
            
        </table>
    {% endif %}
{% endblock %}
    
{% block sidebarContent %}
    
    {% include 'MooiWallBundle:Subject:form.html.twig' %}
    
{% endblock %}